package com.qixiaobao.web.controller.system;

import com.qixiaobao.web.controller.core.controller.BaseController;
import com.qixiaobao.common.core.domain.AjaxResult;
import com.qixiaobao.system.service.IInsureEmailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description 投保增减员邮件推送
 * @Author yangxm
 * @Date 2025/6/17 17:12
 */
@RestController
@RequestMapping("/insureEmail")
public class InsureEmailController extends BaseController {

    @Autowired
    private IInsureEmailService insureEmailService;

    /**
     * 根据投保id查询投保邮件推送信息
     * @param insureId
     * @return
     */
    @GetMapping("/insure/{insureId}")
    public AjaxResult selectInsureEmailByInsureId(@PathVariable Long insureId){
        return AjaxResult.success(insureEmailService.selectInsureEmailByInsureId(insureId));
    }

    /**
     * 根据增减员id查询增减员邮件推送信息
     * @param addminusId
     * @return
     */
    @GetMapping("/addminus/{addminusId}")
    public AjaxResult selectInsureEmailByAddminusId(@PathVariable Long addminusId){
        return AjaxResult.success(insureEmailService.selectInsureEmailByAddminusId(addminusId));
    }
}
